<%-- 
    Document   : register
    Created on : 08 Apr 11, 23:46:10
    Author     : Erdiansyah
--%>

<%@include file="included/redirectin.jspf" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="style/default.css"/>
        <link type="text/css" rel="stylesheet" href="style/registration.css"/>
        <script type="text/javascript" src="script/validation.js"></script>
        <script type="text/javascript" src="script/login.js"></script>
        <script type="text/javascript" src="script/util.js"></script>
        <script type="text/javascript" src="script/inputtextmodifier.js"></script>
        <link type="image/x-icon" rel="shortcut icon" href="imgsrc/wedchaticon.png"/>
        <title>Registration</title>
    </head>
    <body>
        <div class="bodytop">
            <br/>
            <br/>
            <div class="textlinks">
                <a class="textlink" href="javascript:void();" id="signin" onclick="login();changecolor(this.id)">Sign In</a>
                <span class="textlink">|</span>
                <a class="textlink"href="Page?page=index">wedChat</a>
                <div id="loginformcontent"></div>
            </div>
            <div class="labelregistration">wedChat Registration</div>
            <img class="wedimg" src="imgsrc/wed.png"/>
        </div>
        <div class="bodymid">
        <form class="formpos" name="formregister" action="Register" method="post" onsubmit="return validateform('result-validation','result-name','result-user','result-pass','result-confirmpass','result-email');">
            <fieldset>
                <legend class="labelreg" id="titlereg">Registration Form</legend>
                <div class="center"><% if(request.getAttribute("feedback")!=null)out.println(request.getAttribute("feedback")); %></div>
                <div><label class="labelreg">Username : </label>
                    <input class="inputreg" type="text" name="username" id="user" maxlength="12" onblur="validate('user', /^[A-Za-z0-9_\.]+$/, 5, -1, 'result-user');" />
                    <span id="result-user"></span>
                    <br/>
                </div>
                <div><label class="labelreg">Name : </label>
                    <input class="inputreg" type="text" name="name" id="name" maxlength="25" onblur="validate('name', /^[A-Za-z\s]+$/, 5, -1, 'result-name');"/>
                    <span id="result-name"></span>
                    <br/>
                </div>
                <div><label class="labelreg">Password : </label>
                    <input class="inputreg" type="password" name="password" id="pass" maxlength="100" onblur="validate('pass', /^.+$/, 6, -1, 'result-pass');"/>
                    <span id="result-pass"></span>
                    <br/>
                </div>
                <div><label class="labelreg">Confirm Password : </label>
                    <input class="inputreg" type="password" id="conf-pass" maxlength="100" onblur="confirmPassword('pass', 'conf-pass', 'result-confirmpass');"/>
                    <span id="result-confirmpass"></span>
                    <br/>
                </div>
                <div><label class="labelreg">Email : </label>
                    <input class="inputreg" type="text" name="email" id="email" maxlength="64" onblur="validate('email', /^[a-z0-9_\.]+@([a-z0-9_]+\.)+[a-z0-9_]{2,}$/, 5, -1, 'result-email');"/>
                    <span id="result-email"></span>
                    <br/>
                </div>
                <div class="center">
                    <input type="submit" value="Register"/>
                    <div id="result-validation"></div>
                </div>
            </fieldset>
        </form>
        </div>
        <div class="bodybottom">
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <br/>
            <%@include file="included/footer.jspf" %>
        </div>
    </body>
</html>
